﻿function ClientVoteFunc(TabModuleId)
{
    Max=document.getElementById("divMaxVote_"+TabModuleId).value;
    for(var iIndex=0;iIndex<Max;iIndex++)
    {
        checked=document.getElementById("checkVote_"+TabModuleId+"_"+iIndex).checked;
        if(checked)
        {
            ItemId=document.getElementById("txtVoteId_"+TabModuleId+"_"+iIndex).value;
            Subject=document.getElementById("txtVoteName_"+TabModuleId+"_"+iIndex).innerHTML;
            retValue=Portal.SODC.WebSite.Vote.IncVoteItem(ItemId).value;
            if(retValue.indexOf("ERROR")!=-1)
            {
                alert(retValue);
                return;
            }
            alert(Portal.SODC.WebSite.Vote.GetVoteClicked(Subject).value);
            break;
        }
    }
}